package com.xiaomaoguai.webkit;

import java.io.File;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class WebContextListener implements ServletContextListener {

	@Override
	public void contextInitialized(ServletContextEvent event) {
		String userDir = event.getServletContext().getRealPath("");
		WebConstant.WEB_ROOT = userDir;
		WebConstant.WEB_ETC_DIR = userDir + File.separator + "WEB-INF" + File.separator + "etc";
	}

	@Override
	public void contextDestroyed(ServletContextEvent event) {
	}

}